(lambda (tempo pulse)
  (var pulse (* 4 (- pulse 1)))
  (.map (Object.keys (./state)) (lambda (key)
    (var sequencer (get ./state key))
    (sequencer.step.set pulse)
    (.set-timeout (new (require "nanotimer"))
      (lambda () (sequencer.step.set (+ 1 pulse)))
      "" "107142u")
    (.set-timeout (new (require "nanotimer"))
      (lambda () (sequencer.step.set (+ 2 pulse)))
      "" "214285u")
    (.set-timeout (new (require "nanotimer"))
      (lambda () (sequencer.step.set (+ 3 pulse)))
      "" "321428u"))))
